(function(){
	com.hp.demo.vteam.components.ModifyInfoKind = Ext.extend(Ext.form.FormPanel,{
		initComponent:function()
		{
			var record = this.params.infoKind;
			Ext.apply(this,{
				flex:1,
				fullscreen:true,
				items:[
					{
						xtype:'textfield',
						labelWidth:'8em',
						name:'name',
						label:com.hp.demo.vteam.dict.FIELDS.INFOKIND_NAME,
						labelAlign:'left',
						value:record.get('name')
					},
					{
						labelAlign:'top',
						labelWidth:'100%',
						xtype:'textareafield',
						name:'desc',
						value:record.get('desc'),
						label:com.hp.demo.vteam.dict.FIELDS.INFOKIND_DESC
					}
				],
				dockedItems:{
					xtype:'toolbar',
					dock:'bottom',
					items:[
						{xtype:'spacer'},
						{
							xtype:'button',
							scope:this,
							text:com.hp.demo.vteam.dict.ITEM.save,
							handler:function()
							{
								com.hp.demo.vteam.base.status_msg(com.hp.demo.vteam.dict.SUCCESSES.SAVE_BEGIN);
								this.submit({
									url:com.hp.demo.vteam.dict.REQUEST.InfoKind,
									method:'post',
									params:{method:'edit',id:record.get('id')},
									success:function(f,r){
										com.hp.demo.vteam.base.Action(com.hp.demo.vteam.dict.ID.INFO_KIND,com.hp.demo.vteam.dict.SUCCESSES.MODIFY_INFO_KIND);
									},
									failure:function(f,r){
										if(r.status!=200)
										{
											com.hp.demo.vteam.base.status_msg(com.hp.demo.vteam.dict.ERRORS.MODIFY_INFO_KIND_SYS);
										}
										else
										{
											var jRlt = Ext.decode(r.responseText);
											com.hp.demo.vteam.base.status_msg(com.hp.demo.vteam.dict.ERRORS.MODIFY_INFO_KIND + '[' + jRlt.msg + ']!');
										}
									}
								});
							}
						}
					]
				}
			});
			com.hp.demo.vteam.components.ModifyInfoKind.superclass.initComponent.call(this);
		}
	});
	return com.hp.demo.vteam.components.ModifyInfoKind;
})();